﻿using UnityEngine;
using UnityEngine.UI;

namespace Core.Mgr.Localize
{
    public class LocalizedText : MonoBehaviour
    {
        //标记
        public string id;

        private void Start()
        {
            //获取自身的文本框
            var selfText = GetComponent<Text>();
            //如果多国文字已准备好
            if (selfText != null && LocalizedMgr.Ins.IsInitialized)
            {
                //设置文字内容
                selfText.SetLocalizedText(id);
            }
        }
    }
}